package com.syp.auth.domain.enums;

/**
 * 资源类型
 * 
 * @author syp
 * 
 */
public enum ResourceStatusEnum {

	ALL(-1, "所有"), OPEN(1, "启动"), CLOSE(0, "未启用");

	private Integer status;
	private String desc;

	private ResourceStatusEnum(Integer status, String desc) {
		this.status = status;
		this.desc = desc;
	}

	public Integer getStatus() {
		return status;
	}

	public String getDesc() {
		return desc;
	}
	
	public static ResourceStatusEnum getEnum(Integer status){
		for(ResourceStatusEnum rs : ResourceStatusEnum.values()){
			if(rs.getStatus() == status){
				return rs;
			}
		}
		return null;
	}

}
